// 解决IE下无法打开File选择框
(function (window) {
    try {
        new MouseEvent('test');
        return false; // No need to polyfill
    } catch (e) {
        // Need to polyfill - fall through
    }
    var MouseEvent = function (eventType, params) {
        params = params || { bubbles: false, cancelable: false };
        var mouseEvent = document.createEvent('MouseEvent');
        mouseEvent.initMouseEvent(eventType, params.bubbles, params.cancelable, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
        return mouseEvent;
    }
    MouseEvent.prototype = Event.prototype;
    window.MouseEvent = MouseEvent;
})(window);
(function() {
  //判断是否是IE浏览器，包括Edge浏览器
  function IEVersion() {
      //取得浏览器的userAgent字符串
      var userAgent = navigator.userAgent;
      //判断是否IE浏览器
      var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1;
      if (isIE) {
          var reIE = new RegExp("MSIE (\\d+\\.\\d+);");
          reIE.test(userAgent);
          var fIEVersion = parseFloat(RegExp["$1"]);
          if (fIEVersion < 10 || !isSupportPlaceholder()) {
              return true;
          }
      } else {
          return false;
      }
  }
  var tpl = [
      '<div class="browser-tips" style="position:absolute;width: 100%; top:50%;margin-top:-64px;text-align: center;">',
      '<p style="font-size: 20px;color:#000;line-height: 32px;">为了给您提供更优质的网页浏览体验，建议使用IE10及以上版本的浏览器</p>',
      '<p style="font-size: 20px;color:#000;line-height: 32px;">使用“纳税汇总申报”，请升级或更换其他浏览器</p>',
      '</div>'
  ].join('');

  window.onload = function() {
      if (IEVersion()) {
          document.write(tpl);
      }
  };
})();
// 清除登录信息
function REMOVELOGINMSG(){
    window.localStorage.removeItem("wpsmAccessToken");
    window.localStorage.removeItem("wpsmRefreshToken");
    window.localStorage.removeItem("wpsmloginDate");
}